import consultasBD

from dto import *
import model

import dto2ModelFactory
import model2DtoFactory

def get_providers():
    ret = []
    s = model.create_session()
    provModel = s.query(model.Proveedor).order_by(model.Proveedor.nombre).all()
    for p in provModel:
        ret.append(model2DtoFactory.create_proveedor(p))
        
    return ret